package com.tydic.system.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.tydic.system.domain.SysUser;
import com.tydic.system.domain.bo.QuerySysUserBo;
import com.tydic.system.domain.bo.SysUserBo;
import com.tydic.system.domain.vo.SysUserVo;

import java.util.List;

/**
 * 用户 业务层
 *
 * @author Lion Li
 */
public interface ISysUserService {

    SysUserVo selectByLoginCode(String loginCode);

    SysUser getUserByLoginCode(String loginCode);

    boolean existsByLoginCode(String loginCode);

    boolean insertByBo(SysUserBo bo);

    boolean updateByBo(SysUserBo bo);

    boolean changePassword(String loginCode, String password);

    Page<SysUserVo> selectPageUserList(QuerySysUserBo bo);

    SysUserVo getById(String userCode);

    List<SysUser> getUsersByUserTypes(String... userTypes);

    void updateUserType(String userCode, String userType);

    void saveUser(SysUser user, List<String> roleCodes);

    boolean deleteByUserCode(String userCode);
}


